package com.easygo.client;

import com.easygo.common.PageUtils;
import com.easygo.common.ResultResponse;
import com.easygo.pojo.Content;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@FeignClient("EASYGO-ADMIN-SERVER")
public interface ContentClient {

    @RequestMapping("/content_page/{pageIndex}/{pageSize}")
    public PageUtils<Content> getContentPage(@PathVariable("pageIndex") Long pageIndex, @PathVariable("pageSize") Long pageSize);

    @PostMapping("/content_add")
    public ResultResponse content_add(@RequestBody Content content);
}
